<template>
  <div class="category">
    <van-sidebar v-model="activeKey">
    <van-sidebar-item title="标签名称"
      v-for="category in categories"
      :key="category.id"
     />
  </van-sidebar>
  </div>
</template>

<script>
import { findCategories } from '@/api/category'

export default {
  name: 'Category',
  data () {
    return {
      activeKey: 0,
      categories: []
    }
  },
  created () {
    findCategories()
      .then(data => {
        console.log('分类', data)
      })
      .catch(err => {
        console.log('输出报错', err)
      })
  }
}
</script>

<style lang="scss" scoped>

</style>
